package com.centronix.domain;

import java.io.Serializable;
import javax.persistence.*;
import java.util.Date;
import java.util.List;


/**
 * The persistent class for the receipt database table.
 * 
 */
@Entity
public class Receipt implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	private int receiptId;

	private float amount;

	private String cancel;

    @Temporal( TemporalType.DATE)
	private Date receiptDate;

	//bi-directional many-to-one association to BusinessPartner
    @ManyToOne
	@JoinColumn(name="BusinessPartnerId")
	private BusinessPartner businessPartner;

	//bi-directional many-to-one association to ReceiptDetail
	@OneToMany(mappedBy="receipt")
	private List<ReceiptDetail> receiptDetails;

	//bi-directional many-to-one association to ReceiptPayment
	@OneToMany(mappedBy="receipt")
	private List<ReceiptPayment> receiptPayments;

    public Receipt() {
    }

	public int getReceiptId() {
		return this.receiptId;
	}

	public void setReceiptId(int receiptId) {
		this.receiptId = receiptId;
	}

	public float getAmount() {
		return this.amount;
	}

	public void setAmount(float amount) {
		this.amount = amount;
	}

	public String getCancel() {
		return this.cancel;
	}

	public void setCancel(String cancel) {
		this.cancel = cancel;
	}

	public Date getReceiptDate() {
		return this.receiptDate;
	}

	public void setReceiptDate(Date receiptDate) {
		this.receiptDate = receiptDate;
	}

	public BusinessPartner getBusinessPartner() {
		return this.businessPartner;
	}

	public void setBusinessPartner(BusinessPartner businessPartner) {
		this.businessPartner = businessPartner;
	}
	
	public List<ReceiptDetail> getReceiptDetails() {
		return this.receiptDetails;
	}

	public void setReceiptDetails(List<ReceiptDetail> receiptDetails) {
		this.receiptDetails = receiptDetails;
	}
	
	public List<ReceiptPayment> getReceiptPayments() {
		return this.receiptPayments;
	}

	public void setReceiptPayments(List<ReceiptPayment> receiptPayments) {
		this.receiptPayments = receiptPayments;
	}
	
}